
import Vue from "vue";
import App from "./App.vue";
import router from "./router/index.js";
import store from "./store/store.js";
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import './assets/styles/base/base.css';
import './assets/styles/base/baseClass.scss';

Vue.use(ElementUI);

//--------  注册全局过滤器 -------------
import filters from '@/filter/filter.js';
Object.keys(filters).forEach(k => Vue.filter(k, filters[k]));

//--------  注册接口服务  ----------------
// import './mock'//注册Mockjs
import ApiService from '@/api/'
Vue.prototype.api = new ApiService();
//--------  注册接口服务结束  ----------------

//--------  注册字体图标库组件 ---------------
import AppIcon from '@/components/AppCommon/AppIcon'
import '@/assets/fonts/iconfont.js'
Vue.component('app-icon', AppIcon)

//--------  注册图片组件 ---------------
import AppImg from '@/components/AppCommon/AppImg'
Vue.component('app-img', AppImg)

//--------  复写el-dialog，调整弹出框样式 ---------------
import ElDialog from '@/components/ElDialog'
Vue.component('el-dialog', ElDialog)

// import ElMessageBox from '@/components/ElMessageBox'
// Vue.component('el-message-box', ElMessageBox)

//toast组件
// import Toast from './utils/messagePlugin.js';

// Vue.use(Toast);

Vue.config.productionTip = false;

export default new Vue({
    router,
    store,
    render: h => h(App)
}).$mount("#app");